﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PlayerSDK;

namespace TestPlayerHC
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void bPlay_Click(object sender, EventArgs e)
        {
            //PlayCtrl.PlayM4_SetFileRefCallBack(0, FileRefDone, 0);

            PlayCtrl.PlayM4_SetFileEndMsg(0, this.Handle, 0x1111);

            //PlayCtrl.PlayM4_OpenFile(0, "V:\\test.mp4");
            PlayCtrl.PlayM4_OpenFile(0, @"V:\forest-fire-prevention-framework\森林防火系统\record\计算机学院\楼顶大镜头1\2012\09\25\16-46-14-509.mp4");
            PlayCtrl.PlayM4_Play(0, this.Handle);
        }

        protected override void WndProc(ref Message m)
        {
            if (m.Msg == 0x1111)
            {
                MessageBox.Show("播放完毕");
            }
            base.WndProc(ref m);
        }

        private void bFast_Click(object sender, EventArgs e)
        {
            PlayCtrl.PlayM4_Fast(0);
        }
    }
}
